Miles Sound System SDK 7.2a

SETSOUND - MSS Sound Configuration Utility

Discussion

The SETSOUND program may be distributed with MSS applications as an interactive sound driver installation and configuration utility.

SETSOUND requires no command-line parameters. It is intended to be launched after the application's end-user installation program finishes executing, as well as anytime the end user wishes to reconfigure his/her sound options after installation is complete. To avoid memory problems inherent with spawned DOS-extended executables, it is advisable to launch SETSOUND as the last step in the application's INSTALL.BAT batch file, rather than through the use of the C spawn or exec functions. Alternately, SETSOUND.C can be compiled to SETSOUND.OBJ and bound at link time to the application's end-user installation program, simply by renaming SETSOUND.C's main function.

When executed, SETSOUND presents a series of self-explanatory configuration menus. These menus allow the user to select and configure a MIDI music or digital audio driver for use by the MSS application, or to disable sound and music entirely. When either the Select and configure MIDI music driver or Select and configure digital audio driver options are chosen, SETSOUND will scan the current working directory for all MSS .DIG or .MDI drivers and present a list of these drivers to the user. All MSS drivers which are shipped with the application appear on the selection list, along with any drivers which are added to the directory by the user himself. This powerful feature ensures that an application which uses SETSOUND as its sound configuration program will not become "obsolete" as new MSS drivers are released. In accordance with RAD Game Tools's guidelines for driver installation, SETSOUND makes no attempt to install any sound drivers to determine if the supported hardware is present. Instead, DOS environment information (including the BLASTER, ULTRASND, and SNDSCAPE environment variables, as well as the contents of AUTOEXEC.BAT and CONFIG.SYS) is used to help determine which driver should be the "default" choice when the selection menu is first presented.

If the selected driver accepts I/O configuration information, SETSOUND next displays a menu offering the user the ability to Attempt to configure sound driver automatically or Skip auto-detection and configure sound driver manually. No attempt is made to auto-detect devices without the user's permission, except in cases where the driver is able to determine the correct I/O configuration without manipulating the hardware directly. (For example, the Pro Audio Spectrum drivers are able to obtain I/O information from the Media Vision device driver MVSOUND.SYS, so the configuration menu does not appear when one of these drivers is selected.) If the manual configuration option is selected, a series of menus is presented to obtain the correct I/O address, IRQ setting, and/or DMA channel assignments for the supported device. Extensive error-checking and feedback is employed throughout the installation and configuration process to help reduce sound-related technical support issues.

When a driver is successfully selected and configured, SETSOUND creates a plain-text ASCII file (called MDI.INI for MIDI music drivers or DIG.INI for digital audio drivers) which specifies the driver name, device name, and I/O settings which correspond to the user's sound hardware choice. (An example .INI file is presented in the AIL_read_INI function description. If the No MIDI music or No digital audio option is selected, any existing .INI file is deleted entirely.) The .INI files created by SETSOUND are used by the AIL_install_DIG_INI and AIL_install_MDI_INI functions to load, configure, and initialize the digital audio and/or MIDI music driver selected by the user, with no additional effort on the part of the application program.

To distribute an application with SETSOUND, you must distribute SETSOUND.EXE and its "driver list file," MSSDRVR.LST, and its Window 9x configuration utility, MSSW95.EXE. These three files should all exist in the same directory. MSSW95.EXE is spawned by SETSOUND when running under a DOS box in Windows 9x. It can also be run from the command line to display the machine's Windows 9x configuration.

MSSDRVR.LST is a text file which describes all "known" MSS drivers that existed when the current version of SETSOUND was created, and is used by SETSOUND to provide additional helpful information about each driver as the user scrolls through the selection menu. Drivers which are not listed in MSSDRVR.LST appear on the SETSOUND selection menu, but no supplemental information will be presented to the user for these drivers, and they cannot appear as the default choice in the selection menu. SETSOUND uses the current working directory for all of its file access, so all MSS drivers delivered with an application must be copied into a working subdirectory on the user's hard disk during installation, along with MSSDRVR.LST and (preferably) SETSOUND.EXE itself. The DIG.INI and MDI.INI files will be created and stored in this subdirectory as well. Whether SETSOUND is actually copied to the user's sound directory or left on the application's distribution CD, please be sure that SETSOUND can be executed by the end user at any time after installation! Otherwise, the user will be "stuck" with his/her original sound configuration choice, with no alternative but to re-install the application when upgrading or changing sound hardware.

The SETSOUND.EXE distributed from RAD Game Tools was bound with the Causeway DOS extender. This means that unless you rebuild SETSOUND.EXE, you don't need to distribute DOS4GW.EXE. Note that if you rebuild SETSOUND.EXE, you must either link it with an .EXE-bound DOS extender such as Causeway, DOS/4GW Professional or FlashTek X/32, or make sure that a copy of the DOS extender (DOS4GW.EXE) is available in the current path at the time SETSOUND is executed.

Applications which employ only one type of audio support (either digital audio or MIDI music) should be shipped with drivers of only the required type (.DIG or .MDI). SETSOUND will automatically reconfigure its menus to omit all references to the "unsupported" audio format.

Internationalization of the SETSOUND program is possible; however, the interactive nature of its text menu system requires modifications to text strings within SETSOUND.C itself. The file MSSDRVR.LST may be easily modified to support other languages, but it does not contain all of the text strings used by SETSOUND. Contact RAD Game Tools for information on how to modify the specially-formatted text strings used by SETSOUND to present its menus and dialog boxes.

Next Topic (GLIB - Extended MIDI (XMIDI) Global Timbre Librarian)

Previous Topic (MIDIECHO for DOS - MIDI Data Receiver and Interpreter)


Group: Miles Sound System Tools Reference
Related Sections: Distributing Miles with DOS Applications
Related Functions: AIL_install_DIG_INI, AIL_install_MDI_INI, AIL_read_INI

For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.